""" 
@Version: 0.1
@FileName    :    for5
@Author      :    kx
@CreateTime  :    2021/7/7 17:32 
@Description :    输入正整数计算最大公约数和最小公倍数
"""

x = int(input('x = '))
y = int(input('y = '))
if x > y:
    (x, y) = (y, x)
for factor in range (x , 0, -1):
    if x % factor == 0 and y % factor == 0:
        print('x和y的最大公约数是：',factor)
        print('x和y的最小公倍数是：', x * y // factor)
        break
       